package com.bix.util.blizfiles.m2;

import java.nio.ByteBuffer;

public class M2View {
	private	M2CountOffsetPair	indexElements			= new M2CountOffsetPair	();
	private	M2CountOffsetPair	triangleElements	= new M2CountOffsetPair	();
	private	M2CountOffsetPair	vertexElements		= new M2CountOffsetPair	();
	private	M2CountOffsetPair	submeshElements		= new M2CountOffsetPair	();
	private	M2CountOffsetPair	textureElements		= new M2CountOffsetPair	();
	private	int								lodDistance;
	
	public void read (ByteBuffer bb) {
		this.indexElements.read(bb);
		this.triangleElements.read(bb);
		this.vertexElements.read(bb);
		this.submeshElements.read(bb);
		this.textureElements.read(bb);
		lodDistance = bb.getInt();
	}

	/**
	 * @return the indexElements
	 */
	public M2CountOffsetPair getIndexElements() {
		return indexElements;
	}

	/**
	 * @return the triangleElements
	 */
	public M2CountOffsetPair getTriangleElements() {
		return triangleElements;
	}

	/**
	 * @return the vertexElements
	 */
	public M2CountOffsetPair getVertexElements() {
		return vertexElements;
	}

	/**
	 * @return the submeshElements
	 */
	public M2CountOffsetPair getSubmeshElements() {
		return submeshElements;
	}

	/**
	 * @return the textureElements
	 */
	public M2CountOffsetPair getTextureElements() {
		return textureElements;
	}

	/**
	 * @return the lodDistance
	 */
	public int getLodDistance() {
		return lodDistance;
	}
}
